﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Gx.Model.Entity
{
    [Table("LK_Customer")] 
    public class LKCustomer
    {
        [Key]
        private int _id;
        /// <summary>
        /// Id
        /// </summary>
        [Column("Id")]
        public int Id 
        {
            get
            {
                return _id;
            }
            set { _id = value; }
        }
        
        
        private string _customerName;
        /// <summary>
        /// 客户名称
        /// </summary>
        [Column("CustomerName")]
        public string CustomerName 
        {
            get
            {
                if(string.IsNullOrWhiteSpace(_customerName))
                    _customerName=string.Empty;
                return _customerName;
            }
            set { _customerName = value; }
        }
        
        
        private string _customerCode;
        /// <summary>
        /// 客户
        /// </summary>
        [Column("CustomerCode")]
        public string CustomerCode 
        {
            get
            {
                if(string.IsNullOrWhiteSpace(_customerCode))
                    _customerCode=string.Empty;
                return _customerCode;
            }
            set { _customerCode = value; }
        }
        
        
        private int _customerLevelId;
        /// <summary>
        /// 客户级别
        /// </summary>
        [Column("CustomerLevelId")]
        public int CustomerLevelId 
        {
            get
            {
                return _customerLevelId;
            }
            set { _customerLevelId = value; }
        }
        
        
        private string _customerLevelName;
        /// <summary>
        /// 客户级别名称
        /// </summary>
        [Column("CustomerLevelName")]
        public string CustomerLevelName 
        {
            get
            {
                if(string.IsNullOrWhiteSpace(_customerLevelName))
                    _customerLevelName=string.Empty;
                return _customerLevelName;
            }
            set { _customerLevelName = value; }
        }
        
        
        private decimal _balance;
        /// <summary>
        /// 余额
        /// </summary>
        [Column("Balance")]
        public decimal Balance 
        {
            get
            {
                return _balance;
            }
            set { _balance = value; }
        }
        
        
        private string _mobile;
        /// <summary>
        /// 手机
        /// </summary>
        [Column("Mobile")]
        public string Mobile 
        {
            get
            {
                if(string.IsNullOrWhiteSpace(_mobile))
                    _mobile=string.Empty;
                return _mobile;
            }
            set { _mobile = value; }
        }
        
        
        private string _telephone;
        /// <summary>
        /// 固定电话
        /// </summary>
        [Column("Telephone")]
        public string Telephone 
        {
            get
            {
                if(string.IsNullOrWhiteSpace(_telephone))
                    _telephone=string.Empty;
                return _telephone;
            }
            set { _telephone = value; }
        }
        
        
        private string _qq;
        /// <summary>
        /// QQ
        /// </summary>
        [Column("QQ")]
        public string Qq 
        {
            get
            {
                if(string.IsNullOrWhiteSpace(_qq))
                    _qq=string.Empty;
                return _qq;
            }
            set { _qq = value; }
        }
        
        
        private string _weChat;
        /// <summary>
        /// 微信
        /// </summary>
        [Column("WeChat")]
        public string WeChat 
        {
            get
            {
                if(string.IsNullOrWhiteSpace(_weChat))
                    _weChat=string.Empty;
                return _weChat;
            }
            set { _weChat = value; }
        }
        
        
        private string _region;
        /// <summary>
        /// 地区
        /// </summary>
        [Column("Region")]
        public string Region 
        {
            get
            {
                if(string.IsNullOrWhiteSpace(_region))
                    _region=string.Empty;
                return _region;
            }
            set { _region = value; }
        }
        
        
        private string _address;
        /// <summary>
        /// 地址
        /// </summary>
        [Column("Address")]
        public string Address 
        {
            get
            {
                if(string.IsNullOrWhiteSpace(_address))
                    _address=string.Empty;
                return _address;
            }
            set { _address = value; }
        }
        
        
        private string _remark;
        /// <summary>
        /// 备注
        /// </summary>
        [Column("Remark")]
        public string Remark 
        {
            get
            {
                if(string.IsNullOrWhiteSpace(_remark))
                    _remark=string.Empty;
                return _remark;
            }
            set { _remark = value; }
        }
        
        
        private string _tag;
        /// <summary>
        /// 标签
        /// </summary>
        [Column("Tag")]
        public string Tag 
        {
            get
            {
                if(string.IsNullOrWhiteSpace(_tag))
                    _tag=string.Empty;
                return _tag;
            }
            set { _tag = value; }
        }
        
        
        private bool _isBindWeChat;
        /// <summary>
        /// 是否绑定微信
        /// </summary>
        [Column("IsBindWeChat")]
        public bool IsBindWeChat 
        {
            get
            {
                return _isBindWeChat;
            }
            set { _isBindWeChat = value; }
        }
        
        
        private string _wxOpenId;
        /// <summary>
        /// 微信openid
        /// </summary>
        [Column("WxOpenId")]
        public string WxOpenId 
        {
            get
            {
                if(string.IsNullOrWhiteSpace(_wxOpenId))
                    _wxOpenId=string.Empty;
                return _wxOpenId;
            }
            set { _wxOpenId = value; }
        }
        
        
        private bool _isValid;
        /// <summary>
        /// 是否有效
        /// </summary>
        [Column("IsValid")]
        public bool IsValid 
        {
            get
            {
                return _isValid;
            }
            set { _isValid = value; }
        }
        
        
        private System.DateTime _createTime;
        /// <summary>
        /// 创建时间
        /// </summary>
        [Column("CreateTime")]
        public System.DateTime CreateTime 
        {
            get
            {
                if (_createTime == DateTime.MinValue)
                {
                    return DateTime.Parse("1911-01-01");
                }
                return _createTime;
            }
            set { _createTime = value; }
        }
        
        
        private int _createUserId;
        /// <summary>
        /// 创建人id
        /// </summary>
        [Column("CreateUserId")]
        public int CreateUserId 
        {
            get
            {
                return _createUserId;
            }
            set { _createUserId = value; }
        }
        
        
        private string _createUser;
        /// <summary>
        /// 创建人
        /// </summary>
        [Column("CreateUser")]
        public string CreateUser 
        {
            get
            {
                if(string.IsNullOrWhiteSpace(_createUser))
                    _createUser=string.Empty;
                return _createUser;
            }
            set { _createUser = value; }
        }
        
        
        private int _modifyUserId;
        /// <summary>
        /// 修改人id
        /// </summary>
        [Column("ModifyUserId")]
        public int ModifyUserId 
        {
            get
            {
                return _modifyUserId;
            }
            set { _modifyUserId = value; }
        }
        
        
        private string _modifyUser;
        /// <summary>
        /// 修改人
        /// </summary>
        [Column("ModifyUser")]
        public string ModifyUser 
        {
            get
            {
                if(string.IsNullOrWhiteSpace(_modifyUser))
                    _modifyUser=string.Empty;
                return _modifyUser;
            }
            set { _modifyUser = value; }
        }
        
        
        private System.DateTime _modifyTime;
        /// <summary>
        /// 修改时间
        /// </summary>
        [Column("ModifyTime")]
        public System.DateTime ModifyTime 
        {
            get
            {
                if (_modifyTime == DateTime.MinValue)
                {
                    return DateTime.Parse("1911-01-01");
                }
                return _modifyTime;
            }
            set { _modifyTime = value; }
        }
        
        
        private bool _isDeleted;
        /// <summary>
        /// 是否删除(0:未删除,1:删除)
        /// </summary>
        [Column("IsDeleted")]
        public bool IsDeleted 
        {
            get
            {
                return _isDeleted;
            }
            set { _isDeleted = value; }
        }

        private int _companyId;
        /// <summary>
        /// 公司
        /// </summary>
        [Column("CompanyId")]
        public int CompanyId
        {
            get
            {
                return _companyId;
            }
            set { _companyId = value; }
        }
    }
}

